<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $bar="List Staff";
        echo '<table id="box-table-a" cellspacing="1" align="right" border="0" width="900px">';
        //echo '<tr><td colspan=5 align=right class=bar>'.$bar.'</td></tr>';
        echo '<tr><td colspan=5 align=right class=bar>'.'Numbers of result by search:'.$total_rows.'</td></tr>';
        echo '<tr><td colspan=5 align=right class=pagination>'.$pagination.'</td></tr>';
        echo '
              <th>Staff_ID</th>
              <th>FullName (VietNamese)</th>
              <th>FirstName</th>
              <th>LastName</th>
              <th>Action</th>';
        foreach($query->result() as $row){
            //$images='<img src="'.base_url().'application/templates/images/'.$row->staff_avarta.'" width=100 height=70>';
            //$details = anchor("user/loadUpdateForm/$row->Staff_ID",$images);
            echo "<tr>
                        <td class=\"row10\">$row->Staff_ID</td>
                        <td class=\"row12\">$row->FullName</td>
                        <td class=\"row10\">$row->FirstName</td>
                        <td class=\"row12\">$row->LastName</td>";
            $titleUpdate = '<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>';
            $titleDelete = '<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete" onclick="return checkLink();"/>';
            //$titleActive = '<img src ="'.base_url().'application/templates/images/icons/active.jpg" title="Click here to active"/>';
            $titleView = '<img src ="'.base_url().'templates/images/icons/view.gif" height=25 title="Click here to view "/>';
            $titleInsertFamily = '<img src ="'.base_url().'templates/images/icons/insert_family.jpeg" width=40 height=25 title="Click here to insert family"/>';
            $update = anchor("staff/loadStaffUpdateForm/$row->Staff_ID",$titleUpdate);
            $titleViewSalary = '<img src ="'.base_url().'templates/images/icons/view_salary.jpeg" height=25 title="Click here to view salary "/>';
            $delete = anchor("staff/deleteStaff/$row->Staff_ID",$titleDelete);
            //$active = anchor("user/loadConfirmForm/$row->Staff_ID",$titleActive);
            $view_staff=anchor("staff/viewInformationStaff/$row->Staff_ID",$titleView);
            $insert_family=anchor("staff/loadListFamily/$row->Staff_ID",$titleInsertFamily);
            //$view_salary=anchor("salary/viewSalaryStaff/$row->Staff_ID",$titleViewSalary);
            $view_salary=anchor("staff/viewListSalaryOneStaff/$row->Staff_ID",$titleViewSalary);
            $titleExperience = '<img src ="'.base_url().'templates/images/icons/ex.jpeg" width=40 height=25 title="Click here to add experience"/>';
            $experience = anchor("staff/viewExperienceStaff/$row->Staff_ID",$titleExperience);
            echo "<td class=\"row12\" align=\"center\">$update $delete $view_staff $insert_family $view_salary $experience</td></tr>";
            }
            $titleInsert = '<img src ="'.base_url().'templates/images/icons/addstaff.jpeg" width=60 height=40 title="Click here to insert staff"/>';
            $insert = anchor("staff/loadInterviewerPass",$titleInsert);
            echo '<tr><td colspan=5 align=center>'.$insert.'</td></tr>';
            echo '<tr><td colspan=5 align=right class=pagination>'.$pagination.'</td></tr>';
        echo '</table>';
?>
